<?php
/**
 * ============================================================================
 * 版权所有 2008-2011 多多网络，并保留所有权利。
 * 网站地址: http://soft.duoduo123.com；
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用；不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
session_start();
error_reporting(0);
include_once 'comm/config.php';
include_once 'comm/checkpostandget.php';
include_once 'comm/page.class.php';

$cuxiao_id=(int)$_GET['id'];
if($cuxiao_id==0){
    exit(ERR404);
}
$sql="select * from ".$BIAOTOU."activity where id='".$cuxiao_id."'";
$query=mysql_query($sql);
$cuxiao=mysql_fetch_array($query);
$mall_id=$cuxiao['mallid'];
if($mall_id!=""){
	//查找店铺数据库
	$sql="select * from ".$BIAOTOU."mall where id='".$mall_id."'";
	$rs=mysql_query($sql);
	$mall=mysql_fetch_array($rs);
}

$sql="select count(*) as totalnum from ".$BIAOTOU."mall_comment where `mall_id` = '$mall_id'";
$rsnum = mysql_query($sql);
$rownum = mysql_fetch_array($rsnum);
$total=$rownum["totalnum"];

$comment_nums = $total;

$sql="select sum(fen) from ".$BIAOTOU."mall_comment where mall_id='".$mall_id."'";
$query = mysql_query($sql);
$row = mysql_fetch_array($query);
$zong_fen=$row['0'];

$pjf=number_format($zong_fen/$comment_nums,1);

$fen=round($zong_fen/$comment_nums,2);
$x=25.2*$fen;
$tag="coupons";
$pagetag='cuxiao';
include_once 'comm/seo.php';
include_once 'comm/wjt.php';
//引入模版文件
include 'template/'.MOBAN.'/cuxiao.tpl.php';
mysql_close($cfg_link);
?>